home *** CD-ROM | disk | FTP | other *** search
- library ISAPISkeleton;
-
- { Important note about DLL memory management: ShareMem must be the
- first unit in your library's USES clause AND your project's (select
- View-Project Source) USES clause if your DLL exports any procedures or
- functions that pass strings as parameters or function results. This
- applies to all strings passed to and from your DLL--even those that
- are nested in records and classes. ShareMem is the interface unit to
- the DELPHIMM.DLL shared memory manager, which must be deployed along
- with your DLL. To avoid using DELPHIMM.DLL, pass string information
- using PChar or ShortString parameters. }
-
- uses
- SysUtils,
- Classes,
- Httpext;
-
- // CASE MATTERS FOR THIS FUNCTION NAME
- function GetExtensionVersion(var ver: THSE_VERSION_INFO): Boolean; stdcall;
- begin
- result:=True;
- end;
-
- // CASE MATTERS FOR THIS FUNCTION NAME
- function HttpExtensionProc(var ecb: TEXTENSION_CONTROL_BLOCK): LongInt; stdcall;
- var
- FN_Write: TWriteClientProc;
- s: String;
- len: Integer;
- begin
- // Get the callback function
- @FN_Write:=@ecb.WriteClient;
-
- s:='HTTP/1.0 200 OK'+#13#10#13#10+'<html><head><title>ISAPI Generated Page</title><body><h1>This page was generated by ISAPISkeleton.DLL</h1><hr><h3>'+FormatDateTime('ddd, dd mmm yyyy hh:nn:ss "GMT"', Now)+'</h3></body></head></html>';
- len:=Length(s);
-
- // Write to the socket
- FN_WRITE(ecb.ConnID, PChar(s), len, 0)
- end;
-
- // * REQUIRED FOR DYNAMIC BINDING.
- // * Index values aren't need.
- // * Case doesn't matter here.
- exports
- GetExtensionVersion,
- HttpExtensionProc;
-
- begin
- end.
-